package splug.cjk;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;


public class Test{
	
	static private String id = "aaa";
	static private String pw = "aaa";

	public static void main(String args[]){

		try {

			Class.forName("com.mysql.jdbc.Driver");
			Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/carpool?useUnicode=true&characterEncoding=euckr","root","apmsetup");
			Statement stmt = conn.createStatement();
			
			String query = "SELECT passwd FROM member WHERE id = '" + id + "'";
			
			System.out.println(query);
			
			stmt.execute("SET CHARACTER SET euckr");
			stmt.execute("set names euckr");
			
			ResultSet result = stmt.executeQuery(query);
			
			String db_pw = "";
		
			while(result.next()){
				
				db_pw = result.getString("passwd");
				
			}
			
			if(db_pw.equals(pw)){
				
				
				
			}
			else{
				
			}
			
						


		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}

	}
}